﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *
 **/
using Irony.Parsing;

namespace Peter.Logic.Interfaces
{
   /// <summary>
   /// An interface for the code explorer.
   /// </summary>
   public interface ICodeExplorer
   {
      /// <summary>
      /// Thread safe method to create a root code item for the code explorer tree.
      /// </summary>
      /// <param name="text">Text for code item.</param>
      /// <param name="node">Node for code item, can be null.</param>
      /// <returns>The newly create root code item.</returns>
      ModelCodeItem CreateRootCodeItem (string text, ParseTreeNode node);

      /// <summary>
      /// Thread safe method to create a root code item for the code explorer tree.
      /// </summary>
      /// <param name="parent">The parent for the code item, cannot be null.</param>
      /// <param name="text">Text for code item.</param>
      /// <param name="node">Node for code item, can be null.</param>
      /// <returns>The newly create root code item.</returns>
      ModelCodeItem CreateCodeItem (ModelCodeItem parent, string text, ParseTreeNode node);
   }
}
